/*
 *  Cero Project - Copyright   2006 The Cero Developement Team 
 *  (Michael Laguerre, Camille Roux, Matthieu Segret, Mathieu Sivade) 
 * 
 *  This program is free software; you can redistribute it and/or modify it 
 *  under the terms of the GNU General Public License as published by the Free 
 *  Software Foundation; either version 2 of the License, or (at your option) 
 *  any later version.
 * 
 *  This program is distributed in the hope that it will be useful, but 
 *  WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY 
 *  or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 
 *  for more details.
 */

package org.ceroproject.games.base;

import org.ceroproject.games.ActionEvent;

public class ActionPlayYourCards extends ActionPlayCards {

	public ActionPlayYourCards() {
		super("Jouer une ou plusieurs cartes de vos zones");
	}

	public void executeAction() {
		getEvent().getZoneFrom().moveCards(getEvent().getCards(),
				getEvent().getZoneTo());
	}

	public boolean canAct(ActionEvent event) {
		return event.getZoneFrom() != null && event.getZoneTo() != null
				&& event.getCards().size() > 0
				&& event.getPlayer().getZones().contains(event.getZoneFrom());
	}

}
